home *** CD-ROM | disk | FTP | other *** search
/ Tiger Disk 41 / Tiger_Disk_041_1997-08_Tiger-Crew-Disk_de_Side_B.d64 / binaer->dezimal (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  244b  |  10 lines

  1. 1 poke53280,peek(53281):print"[147]"
  2. 2 a$="":input"binaer-zahl ";a$:ifa$=""thenend
  3. 3 iflen(a$)<>8thenprint"8 ziffern.......":goto 2
  4. 4 tl=0:c=0
  5. 5 forx=8to1step-1:c=c+1
  6. 6 tl=tl+val(mid$(a$,c,1))*2^(x-1)
  7. 7 next
  8. 8 printa$;" binaer ";" = ";tl;"dezimal"
  9. 9 poke198,0:wait198,1:poke198,0:goto2
  10.